package com.cy.hui_jie_dan.mapper;

import com.cy.hui_jie_dan.popj.entity.EditProfile;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface EditProfileMapper {
    /**
     * delete by primary key
     * @param profileId primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer profileId);

    /**
     * insert record to table
     * @param record the record
     * @return insert count
     */
    int insert(EditProfile record);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(EditProfile record);

    /**
     * select by primary key
     * @param profileId primary key
     * @return object by primary key
     */
    EditProfile selectByPrimaryKey(Integer profileId);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(EditProfile record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(EditProfile record);
    @Select("select * from edit_profile where user_id =#{userId} ")
    EditProfile selectByUserId(Integer userId);
}